1. Field of the Invention
The present invention relates to methods and devices capable of detecting flicker frequency, and more particularly, to methods and devices capable of detecting flicker frequency caused by a discharge lamp when operating at different frequencies.
2. Description of the Prior Art
With the development of digital technologies, digital cameras become more and more common. A digital camera measures light intensities and transforms the measured optical signals into digital signals for displaying or storing corresponding image data. Normally, a digital camera includes a complementary metal-oxide semiconductor (CMOS) sensor and an electronic rolling shutter (ERS). The CMOS sensor usually includes CMOS devices arranged in a matrix manner, and the ERS can control the exposure time and the exposure frequency of the CMOS devices.
As digital cameras are positioned to replace traditional film-based cameras, they must be capable of operating under a variety of lighting situations. For example, digital cameras must be able to capture videos of scenes which are illuminated by sunlight, if outdoors, or which are illuminated by discharge lamps (such as incandescent or fluorescent lights), if indoors. A discharge lamp is usually driven by an AC (alternative current) source of 50 Hz or 60 Hz frequencies and provides light intensities that vary periodically with time based on different frequencies. During image pick-up of a frame, the ERS only exposes several scan lines of the frame instead of exposing all scan lines simultaneously. Therefore, when the light intensity provided by a light source varies periodically with time, interleaving dark and bright stripes, known as image flicker, can be observed in the frame captured by the ERS-controlled CMOS sensor. For example, when a user wants to take photos indoors using a digital camera, the screen of the digital camera is often used for previewing the effect of shot-selection. If the indoor lighting varies periodically with time, image flicker will be observed in the preview images displayed on the screen of the digital camera and thus influences the judgment of the user. This can cause inconvenience to the user.
Reference is made to FIG. 1 for a diagram illustrating image flicker and variations in the light intensity when a discharge lamp operates at 60 Hz frequency. On the left side of FIG. 1, a frame image illustrates image flicker caused by the discharge lamp operating at 60 Hz frequency. On the right side of FIG. 1, a signal diagram illustrates the variations in the light intensity when the discharge lamp operates at 60 Hz frequency. Curve M depicts how the light intensity varies with the scan lines (or the exposure time of the scan lines) when the discharge lamp is driven by a 60 Hz AC source. When Curve M has minimum values, images picked up by corresponding scan lines have lower brightness; when Curve M has maximum values, images picked up by corresponding scan lines have higher brightness. Therefore, horizontal-striped flicker bands can be observed in the frame image. Two adjacent scan lines providing the same light intensity during image pick-up correspond to an interval on Curve M, which is referred to flicker period. When operating at 60 Hz frequency, the flicker frequency Hf60 of the discharge lamp is 120 Hz and the corresponding flicker period is represented by Tf60 in FIG. 1. Under these circumstances, striped flicker bands of width Lf60 can be observed in the frame image.
Reference is made to FIG. 2 for a diagram illustrating image flicker and variations in the light intensity when a discharge lamp operates at 50 Hz frequency. On the left side of FIG. 2, a frame image illustrates image flicker caused by the discharge lamp operating at 50 Hz frequency. On the right side of FIG. 2, a signal diagram illustrates the variations in the light intensity when the discharge lamp operates at 50 Hz frequency. Curve N depicts how the light intensity varies with the scan lines (or the exposure time of the scan lines) when the discharge lamp is driven by a 50 Hz AC source. When Curve N has minimum values, images picked up by corresponding scan lines have lower brightness; when Curve N has maximum values, images picked up by corresponding scan lines have higher brightness. Therefore, horizontal-striped flicker bands can be observed in the frame image. Two adjacent scan lines providing the same light intensity during image pick-up correspond to an interval on Curve N, which is referred to flicker period. When operating at 50 Hz frequency, the flicker frequency Hf50 of the discharge lamp is 100 Hz and the corresponding flicker period is represented by Tf50 in FIG. 2. Under these circumstances, striped flicker bands of width Lf50 can be observed in the frame image.
In order to avoid image flicker, the exposure time controlled by the ERS is normally set to an integral multiple of the flicker period so that the average light intensity detected during the exposure time is constant. For instance, the exposure time of the ERS can be set to an integral multiple of 8.33 ms and an integral multiple of 10 ms for a discharge lamp operating at 60 Hz and 50 Hz, respectively. However, different frequencies are adopted in different countries for driving discharge lamps. Therefore, to avoid image flickering, it is crucial to correctly detect the operating frequency of a discharge lamp for setting the exposure time of the ERS to a corresponding value.
Reference is made to FIG. 3 for a diagram illustrating a temporal method disclosed in U.S. Patent Publication 2003/0112343 for detecting the operating frequency of a discharge lamp causing image flicker (hereafter referred to flicker frequency). In the prior art method depicted in FIG. 3, the frame of a display panel is divided into a plurality of flicker-detecting frames SUB1-SUBn. By calculating signals measured by each flicker-detecting frame, brightness variations can be obtained for acquiring the flicker frequency. The disadvantage of this prior art is that functions such as auto-exposure and auto white balance have to be terminated while detecting the flicker frequency.
In U.S. Patent Publication 2003/0090566, another temporal method for detecting the flicker frequency of a discharge lamp is disclosed. The exposure time of the CMOS sensor is set to a multiple of 100 Hz and 120 Hz, respectively. After formatting and performing Fast Fourier Transform (FFT) on optical signals measured under these exposure times, the flicker frequency can thus be obtained.
Also, in U.S. Patent Publications 2004/0201729 and 2004/0012692, spatial methods for detecting the flicker frequency of a discharge lamp are disclosed. After measuring a signal waveform of a scan line in a frame, Discrete Fourier Transform (DFT) or FFT is performed for determining whether the maximum value of the signal corresponds to flicker frequency 110 Hz or 120 Hz. The spatial methods for detecting the flicker frequency require complicate systems for performing DFT or FFT.